package com.vincent.template.domain;

import com.vincent.template.commons.base.BaseIdEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * @author Vincent Wang
 * @date 2020/12/29 16:03
 */
@Entity
@Table(name = "sys_bind_auth_group_auth",
        indexes = {@Index(name = "idx_authId", columnList = "authId")},
        uniqueConstraints = {@UniqueConstraint(name = "UK_authGroupId_authId", columnNames = {"authGroupId","authId"})})
public class SysBindAuthGroupAuthPo extends BaseIdEntity {

    /**
     * 权限组ID
     */
    @Column(nullable = false)
    private Long authGroupId;

    /**
     * 权限ID
     */
    @Column(nullable = false)
    private Long authId;

    public Long getAuthGroupId() {
        return authGroupId;
    }

    public void setAuthGroupId(Long authGroupId) {
        this.authGroupId = authGroupId;
    }

    public Long getAuthId() {
        return authId;
    }

    public void setAuthId(Long authId) {
        this.authId = authId;
    }

    public SysBindAuthGroupAuthPo() {
    }

    public SysBindAuthGroupAuthPo(Long authGroupId, Long authId) {
        this.authGroupId = authGroupId;
        this.authId = authId;
    }
}
